-
Notifications
You must be signed in to change notification settings - Fork 184
type_def argument of Client is now deprecated. #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type_def argument of Client is now deprecated. #113
Conversation
You should use 'schema=' now instead of 'type_def=' The schema argument will accept either: - a string (previously passed to the type_def argument) - a GraphQLSchema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather have removed the type_def
argument and mark as breaking change for gql v3.
We could leave it as deprecated now and remove it once we are at the stable 3.0 ? |
Well I am okay with that as long as it doesn't stay for more than 2 minor releases after stable 😄 |
The Client of gql allows us now to pass a local schema either:
schema
argument if the schema is a GraphQLSchema typetype_def
argument if the schema is passed as a stringBut this is basically the same thing expressed with different types.
I propose to simplify the documentation that the
type_def
argument becomes deprecated and that the local schema is passed using theschema
argument for both types.To summarize, you should use
schema=
now instead of previouslytype_def=
in the Client.The schema argument will accept either: